<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>逐字出现</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }
      div {
        font-size: 20px;
        width: 0;
        height: 30px;
        white-space: nowrap;
        overflow: hidden;
        animation: step-by-step 3s steps(8) infinite;
      }
      @keyframes step-by-step {
        0% {
        }
        100% {
          width: 160px;
        }
      }
    </style>
  </head>
  <body>
    <div>你是一个大肥猪</div>
  </body>
</html>
